1. Field of the Invention
The present invention relates to a semiconductor device capable of holding data even when the supply of power is stopped and a method for driving the semiconductor device.
In this specification, a “semiconductor device” means a device which includes a semiconductor element or a circuit which includes a semiconductor element.
2. Description of the Related Art
As for semiconductor devices such as micro processing units (MPUs), improvement of operation frequency and miniaturization of elements have been researched and developed in order to improve performance and reduce power consumption. On the other hand, power consumption of semiconductor devices due to leakage power caused by miniaturization of elements is increased.
Such a problem of increase in power consumption is tried to be solved by a technique for reducing power consumption such as a power gating technique in which supply of power is stopped in a short period during which supply of power is not needed. Further, in recent years, a technique, which is called normally off computing, in which even in a circuit which always needs supply of power, needed data is saved in a nonvolatile memory unit and power is supplied only when necessary has attracted attention.
Patent Document 1 discloses the structure in which a magnetoresistive random access memory (MRAM) is used as a memory element in a nonvolatile memory unit. In Patent Document 1, data is saved from a volatile memory unit to a nonvolatile memory unit immediately before the supply of power is stopped, and the data is restored from the nonvolatile memory unit to the volatile memory unit immediately after the supply of power is resumed.